/**
 * 节流函数
 * @param {Function} fn 节流执行实体函数
 * @param {number} delay 节流时长
 * @returns 执行函数
 */
const throttled = (fn, delay = 500) => {
  let oldTime = Date.now()

  return (...args) => {
    let newTime = Date.now()
    if (newTime - oldTime > delay) {
      fn.apply(null, args)
      oldTime = newTime
    }
  }
}

/**
 * 滚动加载，加载更多或滚动到底部监听
 * 拖拽事件
 */
